import request from '@/utils/request'

// 查询车辆车型列表
export function listType(query) {
  return request({
    url: '/vehicle/type/list',
    method: 'get',
    params: query
  })
}

// 查询车辆车型详细
export function getType(id) {
  return request({
    url: '/vehicle/type/' + id,
    method: 'get'
  })
}

// 新增车辆车型
export function addType(data) {
  return request({
    url: '/vehicle/type',
    method: 'post',
    data: data
  })
}

// 修改车辆车型
export function updateType(data) {
  return request({
    url: '/vehicle/type',
    method: 'put',
    data: data
  })
}

// 删除车辆车型
export function delType(id) {
  return request({
    url: '/vehicle/type/' + id,
    method: 'delete'
  })
}
// 添加车辆车型参数设置
export function addParams(data) {
  return request({
    url: '/vehicle/type/params/settings',
    method: 'post',
    data:data
  })
}
// 查询车辆车型参数设置
export function queryTypeParams(id) {
  return request({
    url: '/vehicle/type/paramSettings/' + id,
    method: 'get',
  })
}
// 修改车辆车型参数设置
export function editParams(data) {
  return request({
    url: '/vehicle/type/params/settings',
    method: 'put',
    data:data
  })
}
// 添加车型控制设置
export function addControl(data) {
  return request({
    url: '/vehicle/type/control/settings',
    method: 'post',
    data:data
  })
}
// 查询车型控制设置
export function queryTypeControl(id) {
  return request({
    url: '/vehicle/type/control/settings/' + id,
    method: 'get',
  })
}
// 修改车型控制设置
export function editControl(data) {
  return request({
    url: '/vehicle/type/control/settings',
    method: 'put',
    data:data
  })
}
